#ifndef EXPORT_MANAGER_H
#define EXPORT_MANAGER_H

#include <_qhashhelper.h>
#include <idocument.h>

#include <QtCore/QHash>

namespace swp
{
class IExporter;

class ExportManager
{
public:
    static ExportManager* getInstance();
    static void destroy();

    void registerExporter(const core::MimeType& mimetype,
        IExporter* exporter);
    void unregisterExporter(const core::MimeType& mimetype);

    void exportReport(const QSharedPointer<core::IDocument>& report);

private:
    ExportManager();
    ~ExportManager();

private:
    QHash<core::MimeType, IExporter* > m_registeredExporters;
};

} // namespace swp

#endif
